﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CateSelector.aspx.cs" Inherits="Sdepci.InfoCode.Web.CodeIndex.CateSelector" %>
<%@ Register src="../Includes/VerifyLoginState.ascx" tagname="VerifyLoginState" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>选择索引</title>
    <link rel="stylesheet" type="text/css" href="../Css/Style.css" />
    <link rel="stylesheet" type="text/css" href="../Css/Backstage.css" />
    <base target="_self" />
    <script type="text/javascript" src="../Javascript/Tree.js"></script>
    <script type="text/javascript">
        function ShowTree() {
            imagesDir = "../Images/Tree/";
            menuIconDir = "../Images/MenuIcon/";
            icon = false;
            if (window.dialogArguments.document.getElementById("type").value == "singlecate") {
                checktype = "radio";
                selected = window.dialogArguments.document.getElementById("singlecate_source").value;
            }
            else if (window.dialogArguments.document.getElementById("type").value == "multicate") {
                checktype = "checkbox";
                selected = window.dialogArguments.document.getElementById("multicate_source").value;
            }
            InitTreeXml();
            NodeAllExpand(rootNode);
        }

        function GetCates() {
            if (window.dialogArguments.document.getElementById("type").value == "singlecate") {
                window.dialogArguments.document.getElementById("singlecate_source").value = GetReturnValue();
            }
            else if (window.dialogArguments.document.getElementById("type").value == "multicate") {
                window.dialogArguments.document.getElementById("multicate_source").value = GetReturnValue();
            }
            self.close();
        }
    </script>
</head>
<body onload="javascript:ShowTree();">
    <form id="form1" runat="server">
    <div id="container">
        <div id="menutree" style="text-align: left; border: solid 1px #99cccc; height: 380px; overflow: auto;">
            <div id="root_child">载入中...</div>
        </div>
        <div id="buttonregion">
            <input type="button" class="button" value="确定" onclick="javascript:GetCates();" />
            <input type="button" class="button" value="取消" onclick="javascript:self.close();" />
        </div>
    </div>
    </form>
</body>
</html>
